﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewPaper.aspx.cs" Inherits="dcwj.NewPaper" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head id="Head1" runat="server">
    <title>新建调查问卷</title>
    <link href="css/main.css" type="text/css" rel="stylesheet">
    <link href="js/My97DatePicker/skin/WdatePicker.css" rel="stylesheet" type="text/css" />
    <script src="js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script type="text/javascript">
        function checkSel() {
            if (document.getElementById("ddlBrand").selectedIndex == 0) {
                alert("请选择品牌");
                return false;
            }
            if (document.getElementById("ddlPosition").selectedIndex == 0) {
                alert("请选择岗位");
                return false;
            }
            if (document.getElementById("ddlRegion").selectedIndex == 0) {
                alert("请选择区域");
                return false;
            }
            if (document.getElementById("ddlTGroup").selectedIndex == 0) {
                alert("请选择讲师部门");
                return false;
            }
            if (document.getElementById("ddlTeacher").selectedIndex == 0) {
                alert("请选择讲师");
                return false;
            }
            if (document.getElementById("dtStart").value == '') {
                alert("请输入开始日期");
                return false;
            }
            if (document.getElementById("dtEnd").value == '') {
                alert("请输入结束日期");
                return false;
            }
            if (document.getElementById("txtPaperNm").value == '') {
                alert("请输入问卷名称");
                return false;
            }
            if (document.getElementById("dtEnd").value != '' &&
            document.getElementById("dtStart").value != '') {
                if (document.getElementById("dtEnd").value < document.getElementById("dtStart").value) {
                    alert("开始日期要小于结束日期");
                    return false;
                }
            }

            var radListItems = document.all("rdoPaperType");
            var radListCheckedValue = "";
            var radListItesCount = radListItems.length - 1;

            for (var i = 1; i <= radListItesCount; i++) {
                if (radListItems[i].checked) {
                    radListCheckedValue = radListItems[i].value;
                }
            }
            if (radListCheckedValue == "") {
                alert("请选择问卷类型");
                return false;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <br>
    <table class="usertableborder" cellspacing="1" cellpadding="3" width="96%" align="center"
        border="0">
        <tr>
            <th colspan="4">
                :::新建调查问卷:::
            </th>
        </tr>
        <tr>
            <td colspan="4" class="usertablerow1">
                <table width="100%">
                    <tr>
                        <td class="usertablerow1" width="13%">
                            品 牌
                        </td>
                        <td class="usertablerow1" width="20%">
                            <asp:DropDownList ID="ddlBrand" runat="server" Width="100px">
                            </asp:DropDownList>
                            <div align="right">
                            </div>
                        </td>
                        <td class="usertablerow1" width="13%">
                            <div align="center">
                                区 域</div>
                        </td>
                        <td class="usertablerow1" width="20%">
                            <asp:DropDownList ID="ddlRegion" runat="server" Width="100px">
                            </asp:DropDownList>
                            <div align="right">
                            </div>
                        </td>
                        <td class="usertablerow1" width="13%">
                            <div align="center">
                                岗 位</div>
                        </td>
                        <td class="usertablerow1" width="21%">
                            <asp:DropDownList ID="ddlPosition" runat="server" Width="100px">
                            </asp:DropDownList>
                            <div align="right">
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="usertablerow2" width="25%">
                讲师所属部门
            </td>
            <td class="usertablerow2" width="25%">
                <asp:DropDownList ID="ddlTGroup" runat="server" Width="100px" AutoPostBack="True"
                    OnSelectedIndexChanged="ddlTGroup_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
            <td class="usertablerow2" width="25%">
                <asp:Label ID="lblTeacherNM" runat="server" Text="讲　　师"></asp:Label>
            </td>
            <td class="usertablerow2" width="25%">
                <asp:DropDownList ID="ddlTeacher" runat="server" Width="100px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="usertablerow1" width="25%">
                开始日期
            </td>
            <td class="usertablerow1" width="25%">
                <input class="Wdate" runat="server" id="dtStart" name="dtStart" type="text" onclick="WdatePicker()">
            </td>
            <td class="usertablerow1" width="25%">
                结束日期
            </td>
            <td class="usertablerow1" width="25%">
                <input class="Wdate" runat="server" id="dtEnd" name="dtEnd" type="text" onclick="WdatePicker()">
                </input>
            </td>
        </tr>
        <tr>
            <td class="usertablerow2" width="25%">
                问卷类型
            </td>
            <td class="usertablerow2" width="25%">
                <asp:RadioButtonList ID="rdoPaperType" runat="server" RepeatDirection="Horizontal"
                    BorderStyle="None">
                </asp:RadioButtonList>
            </td>
            <td class="usertablerow2" width="25%">
                问卷名称
            </td>
            <td class="usertablerow2" width="25%">
                <asp:TextBox ID="txtPaperNm" runat="server" Width="200px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="5" class="usertablerow1">
                <table width="100%">
                    <td class="usertablerow1" width="15%">
                        项目经理
                    </td>
                    <td class="usertablerow1" width="10%">
                        <asp:DropDownList ID="ddlPM" runat="server" Width="100px">
                        </asp:DropDownList>
                        <div align="right">
                        </div>
                    </td>
                    <td class="usertablerow1" width="15%">
                        <div align="center">
                            项目类型</div>
                    </td>
                    <td class="usertablerow1" width="10%">
                        <asp:DropDownList ID="ddlPTYPE" runat="server" Width="100px">
                        </asp:DropDownList>
                        <div align="right">
                        </div>
                    </td>
                    <td class="usertablerow1" width="15%">
                        <div align="center">
                            培训天数</div>
                    </td>
                    <td class="usertablerow1" width="10%">
                        <asp:DropDownList ID="ddlTrainningDays" runat="server" Width="100px">
                        </asp:DropDownList>
                        <div align="right">
                        </div>
                    </td>
                    <td class="usertablerow1" width="15%">
                        <div align="center">
                            学员数量</div>
                    </td>
                    <td class="usertablerow1" width="10%">
                        <asp:TextBox ID="txtStudentCounts" runat="server" Width="100px"></asp:TextBox>
                        <div align="right">
                        </div>
                    </td>
                </table>
            </td>
        </tr>
    </table>
    <table cellspacing="1" cellpadding="3" width="96%" align="center" border="0">
        <tr>
            <td colspan="4" style="color: Red">
                [备注] 问卷名称书写规则：客户名--区域--岗位--时间--老师名--班级名，如“雷诺北区总经理8月份田奕 A班”
            </td>
        </tr>
    </table>
    <br>
    <table cellspacing="1" cellpadding="3" width="96%" align="center" border="0">
        <tr>
            <td align="center">
                <asp:Button ID="btnNewSave" runat="server" Text="保 存 问 卷" OnClick="btnNewSave_Click" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
